package com.jw.xzg.utils;

import com.jw.xzg.model.UserModel;

/**
 * Created by Administrator on 2017/4/3.
 */

public class CommonUtils {
    private static long lastClickTime;
    private  static UserModel userInfo;
    private static String token;
    public static boolean isFastDoubleClick() {
        long time = System.currentTimeMillis();
        long timeD = time - lastClickTime;
        if ( 0 < timeD && timeD < 800) {
            return true;
        }
        lastClickTime = time;
        return false;
    }
    public static UserModel getCurrentUser(){
        return userInfo;
    }

    public static void setCurrentUser(UserModel user){
        userInfo = user;
    }
    public static void setToken(String _token){
        token = _token;
    }
    public static String getToken(){
        return token;
    }

}
